package com.zhanglu.fun.services.chatroom.message;

import com.zhanglu.fun.services.chatroom.login.TokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description
 * @Auther zhanglu
 * @Date 2017/10/20 下午4:01
 */
@RestController
public class TestCo {
    @Autowired
    private TokenService tokenService;

    @PreAuthorize("hasRole('NORMAL')")
    @GetMapping("/test")
    public String test() {
        return "test";
    }

    @GetMapping("/auth/test")
    public String authtest() {
        return "auth test";
    }

}
